var path =require('path');
var express = require('express');
var webpack = require('webpack');
var app = express();
var compiler = webpack(require('./webpack.config.dev'));

app.use(require('webpack-dev-middleware')(compiler));
//     , {
//     noInfo: true
// })

app.use(require('webpack-hot-middleware')(compiler))

app.get('*', (req, res) => {
    // eslint-disable-next-line no-undef
    res.sendFile(path.join(__dirname, 'src/index.html'))
});
// eslint-disable-next-line no-undef
var port = process.env.port || 9091;
app.listen(port, '0.0.0.0', function(err){

});
